package com.info33.platform.business.app.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.info33.platform.business.app.dto.AppMenuRoleDTO;
import com.info33.platform.business.app.dto.AppRoleDTO;
import com.info33.platform.business.app.entity.AppMenuRole;
import com.info33.platform.business.app.entity.AppRole;
import com.info33.platform.business.app.vo.AppMenuVO;
import com.info33.platform.business.app.vo.AppRoleVO;
import com.info33.platform.business.app.vo.AppTenantUserVO;
import com.info33.platform.common.mvc.vo.Result;
import com.info33.platform.system.dto.SysUserDTO;
import com.info33.platform.system.vo.SysUserVO;

import java.util.List;

/**
 * @author admin
 */
public interface AppMenuRoleService extends IService<AppMenuRole> {

    /**
     * pc - 角色绑定菜单
     *
     * @param dto-
     * @return -
     */
    Result<Object> pcBindRole(AppMenuRoleDTO dto);

    /**
     * pc - 用户绑定菜单
     *
     * @param dto-
     * @return -
     */
    Result<Object> pcBindUser(AppMenuRoleDTO dto);

    /**
     * pc - 菜单绑定全部
     *
     * @param dto-
     * @return -
     */
    Result<Object> pcBindAll(AppMenuRoleDTO dto);

    /**
     * pc - 拥有权限的用户
     *
     * @param page-
     * @param dto-
     * @return -
     */
    IPage<SysUserVO> pcUser(Page<SysUserVO> page, SysUserDTO dto);

    /**
     * pc - 拥有权限的角色
     *
     * @param page-
     * @param dto-
     * @return -
     */
    IPage<AppRoleVO> pcRole(Page<AppRole> page, AppRoleDTO dto);

    /**
     * pc - 拥有权限的某用户详情
     *
     * @param uid-
     * @return -
     */
    AppTenantUserVO pcUserDetail(Long uid);

    /**
     * pc - 拥有权限的某角色详情
     *
     * @param rid-
     * @return -
     */
    AppRoleVO pcRoleDetail(Long rid);

    /**
     * pc - 编辑用户
     *
     * @param dto-
     * @return -
     */
    Result<Object> pcEditUser(AppMenuRoleDTO dto);

    /**
     * pc - 编辑角色
     *
     * @param dto-
     * @return -
     */
    Result<Object> pcEditRole(AppMenuRoleDTO dto);

    /**
     * pc - 绑定全部的菜单 id 集合
     *
     * @param tenantId-
     * @return -
     */
    List<AppMenuVO> pcAll(Long tenantId);

    /**
     * pc - 编辑全部
     *
     * @param dto-
     * @return -
     */
    Result<Object> pcEditAll(AppMenuRoleDTO dto);
}